﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;

namespace GCard
{
    public delegate void DelTEXT(string str);

    public partial class ChartForm : Form
    {

        public ChartForm()
        {
            InitializeComponent();
            timer1.Enabled = true;
        }
        List<double> data;
        List<DateTime> dataTime;

        private void timer1_Tick(object sender, EventArgs e)
        {
           
        }

        private void ChartForm_Load(object sender, EventArgs e)
        {
            //Random rnd = new Random();
            //var data = Enumerable.Range(0, 10).Select((x, i) => rnd.NextDouble() + x * 0.6).ToList();
            //var t = Enumerable.Range(0, 10).Select(x => x * 30).Select(x => new { h = x / 3600, m = (x % 3600) / 60, s = (x % 3600) % 60 })
            //    .Select(x => new DateTime(1900, 1, 1, x.h, x.m, x.s, DateTimeKind.Local)).ToList();
            //chart1.Series[0].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
            //chart1.Series[0].XValueType = ChartValueType.Time;
            //chart1.Series[0].YValueType = ChartValueType.Double;
            //chart1.Series[0].Points.DataBindXY(t, data);
        }
        GtsCard.Alarm cardxx = new GtsCard.Alarm();
        
        public void eee(object sender ,EventArgs e)
        {
            Console.WriteLine("1111");
        }
        private void btn_md5_Click(object sender, EventArgs e)
        {
            cardxx.AlarmEvent += new GtsCard.Alarm.AlarmEnventHandler(eee);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            cardxx.OnAlarm();
        }

    }
}
